﻿@{
    ViewBag.Title = "Login";
}

<!--
Author: W3layouts
Author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE html>
<html>
<head>
    <title>善解人衣新人注册</title>
    <!-- for-mobile-apps -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Multi Progressive Form Widget Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />

    <link href="~/Login_css/css/style.css" rel="stylesheet" />
    <link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
    <script src="~/Register_css/js/jquery-2.1.3.min.js"></script>
    <script src="~/Js_fromSubmit/jquery-form.js"></script>
    <script>

        function Submit() {
            var name = $("#name").val();
            var pwd = $("#pwd").val();
            var email = $("#email").val();
            var phone = $("#phone").val();
            var File1 = $("#File1").val();
            var sex = $("input[name='sex']:checked").val();
            if (name == "") {
                alert('名称不能空');
                return;
            }
            if (pwd == "") {
                alert('密码不能空');
                return;
            }
            if (email == "") {
                alert('email不能空');
                return;
            }
            if (phone == "") {
                alert('phone不能空');
                return;
            }
            if (File1 == "") {
                alert('文件不能空');
                return;
            }
            if (sex == "") {
                alert('性别不能空');
                return;
            }
            $("#testform").ajaxSubmit({
                success: function (i) {
                    if (i == 1) {
                        alert('上传文件失败!');//1上传文件失败 2注册成功! 3注册失败
                    }
                    if (i == 2) {
                        alert('注册成功!');
                        location.href = '/Register/Login';
                    }
                    if (i == 3) {
                        alert('注册失败!');
                    }
                }

            });
        }
    </script>
    <link href="~/Register_css/css/style.css" rel="stylesheet" type="text/css" media="all" />/>
</head>
<body>
    <div class="main">
        <h1>善解人衣新人注册</h1>
        <div id="wrapper" class="wrapper_w3layouts">
            <form action="/Register/RegisterDo" class="testform" id="testform" method="post" enctype="multipart/form-data">
                @*<fieldset class="personal-data w3_agileits_field">*@
                <div class="username">
                    <span class="username">用户名:<i class="required">*</i></span>
                    <input type="text" id="name" name="name" class="name" placeholder="张望" />
                    <div class="clear"></div>
                </div>
                <div class="username">
                    <span class="username">密码: <i class="required">*</i></span>
                    <input type="password" id="pwd" name="pwd" class="name" placeholder="×××" />
                    <div class="clear"></div>
                </div>
                <div class="username">
                    <span class="username">邮箱: <i class="required">*</i></span>
                    <input type="email" name="email" id="email" class="name" placeholder="wangshang@mail.com" />
                    <div class="clear"></div>
                </div>
                <div class="username">
                    <span class="username">电话:</span>
                    <input type="tel" name="phone" id="phone" class="name" placeholder="000-000-000" />
                    <div class="clear"></div>
                </div>
                <div class="username">
                    <span class="username">头像上传:</span>
                    <input id="File1" name="File1" class="name" type="file" />
                    <div class="clear"></div>
                </div>
                <div class="username">
                    <span class="username">性别:</span>
                    <input type="radio" name="sex" value="男" style="width:50px;color:white;" />男
                    <input type="radio" name="sex" value="女" style="width:50px;color:white;" />女
                    <div class="clear"></div>
                </div>
                @*</fieldset>*@


                <br /><br />
                <input id="Submit1" class="login" type="button" onclick="Submit()" @*style="color:#dfcdea;background-color:#00ffff"*@ value="提交" />
                <div class="clear"></div>
            </form>
        </div>
        <script src="~/Register_css/js/jquery.validate.min.js"></script>
        <script src="~/Register_css/js/simpleform.min.js"></script>
        <script type="text/javascript">
        </script>
    </div>
</body>
</html>